package cn.wolfcode.service.Impl;

import cn.wolfcode.domain.Dept;
import cn.wolfcode.mapper.DeptMapper;
import cn.wolfcode.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptMapper deptMapper;

    @Override
    public List<Dept> list() {
        return deptMapper.list();

    }

    @Override
    public void delete(long id) {
        deptMapper.delete(id);
    }

    @Override
    public void save(Dept dept) {
        deptMapper.insert(dept);
    }

    @Override
    public Dept findById(long id) {
        return deptMapper.findById(id);
    }

    @Override
    public void update(Dept dept) {
        deptMapper.update(dept);
    }
}
